﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevExpress.Utils;

namespace Insurance.ReadCard
{
    public class SysPublic
    {
        /// <summary>
        /// 读卡类型，市民卡
        /// </summary>
        public const string READ_TYPE_CITYCARD = "1";

        /// <summary>
        /// 医保电子凭证
        /// </summary>
        public const string READ_TYPE_YBDZPZ = "2";

        /// <summary>
        /// 读卡类型，虚拟卡
        /// </summary>
        public const string READ_TYPE_VITUAL = "3";

        /// <summary>
        /// 读卡类型，健康卡
        /// </summary>
        public const string READ_TYPE_HEALTHCARD = "4";

        /// <summary>
        /// 读卡类型，刷脸
        /// </summary>
        public const string READ_TYPE_FACE = "5";

        /// <summary>
        /// 地区读卡类型
        /// </summary>
        public const string READER_TYPE = "ZJ_HZ_310000";

        public static WaitDialogForm waitting = null;

        public static void showLoading(string caption, string title)
        {
            if (waitting == null)
            {
                waitting = new WaitDialogForm(caption, title);
            }
            waitting.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            waitting.TopMost = true;
            waitting.Show();
        }

        public static void hideLoading()
        {
            waitting.Hide();
            waitting.Dispose();
            waitting = null;
        }
    }
}